<?php
/**
 * Created by PhpStorm.
 * User: cen
 * Date: 2020/6/29
 * Time: 22:37
 */

namespace app\admin\model;


use think\Model;

class NewsModel extends Model
{

    protected $table = 'news';
    protected $autoWriteTimestamp = true;
    protected $updateTime = false;

    // 定义全局的查询范围
    protected function base($query)
    {
        $query->where('status',0);
    }
}